
export type Color = 'Black' | 'White'
export type Rank = 1 | 2 | 3
export type File = 'A' | 'B'

export class Position {
    constructor(
        private file: File, // 在构造方法中添加访问符号会自动把参数赋值给this(this.file)
        rank: Rank
    ) { }
}

export class Piece {
    protected position: Position
    constructor(
        private readonly color: Color, //
        file: File,
        rank: Rank
    ) {
        this.position = new Position(file, rank)
    }
}


